using System;

namespace MDAControlsFramework {
	/// <summary>
	/// Basic object, which can be set by this methods
	/// </summary>
	public interface IMDAObject: ICloneable {
		/// <summary>
		/// set property object. Type is set by type of object
		/// </summary>
		/// <param name="objectInstance">instance of object, which is added</param>
		/// <returns>if class can set this object</returns>
		bool AddObject(IMDAObject objectInstance);

		/// <summary>
		/// set property by name
		/// </summary>
		/// <param name="name">name of property</param>
		/// <param name="value">value of property</param>
		/// <returns>if class can set this property</returns>
		bool SetProperty(string name, string value);
		//bool SetProperty(string name, object value);

		/// <summary>
		/// returns name of control, needed for compatibility
		/// </summary>
		/// <returns>name of control else "null"</returns>
		string GetName();

		/// <summary>
		/// add event handler to list, for later inicialization
		/// </summary>
		/// <param name="eventName">name of event</param>
		/// <param name="eventHandler">name of event handler</param>
		void AddEvent(string eventName, string eventHandler);
	}
}
